import { hasToken } from "../utils/auth"

export function setUpPermission(router: any): void {
    router.beforeEach(async (to, from, next) => {

        if (to.meta.isPublic) return next();

        if (!hasToken()) return next('/login');

        next()
    })
}

function createRouter() {

}